<template>
  <div>
    <div class="content">
      <h3>{{ title }}</h3>
      <div class="location">
        <span class="spantime">发布时间：{{ time }}</span>
        <span style="clear: both;" />
        <div v-html="content" />
      </div>
    </div>
  </div>
</template>
<script>
import { getNoticeDetails } from '@/api/notice'
export default {
  name: 'NoticeDetails',
  data() {
    return {
      title: '',
      time: '',
      content: ''
    }
  },
  computed: {
    record() {
      return JSON.parse(localStorage.getItem('row'))
    }
  },
  created() {
    const id = this.record.id
    this.time = this.record.created_at
    getNoticeDetails(id).then((res) => {
      this.title = res.data.data.title
      this.content = res.data.data.content
    })
  },
  methods: {}
}
</script>
<style lang="scss" scoped>
.content {
  padding: 24px;
  h3 {
    text-align: center;
    font-size: 36px;
    margin: 0;
    margin-bottom: 24px;
  }
  .location {
    .spantime {
      float: right;
    }
    width: 100%;
    border-top: 1px solid #dfdfdf;
    margin-right: 400px;
    margin-top: 20px;
    padding-left: 80px;
    padding-right: 80px;
    padding-top: 24px;
    // background-color: aliceblue;
    word-wrap: break-word;
    word-break: normal;
    div {
      margin-top: 36px;
      p {
        font-size: 50px;
      }
    }
    p {
      font-size: 50px;
    }
  }
}
p{
  font-size: 50px;
}
img{
  width: 100%;
}
.wscnph{
  max-width: 100%;
   height: 100%;
}
</style>
<style lang="css" scoped>
.location /deep/ .wscnph{
 max-width: 100%;
}
</style>
